package com.app.bimo.library_db;

import com.bytedance.sdk.openadsdk.TTFeedAd;

import org.greenrobot.greendao.annotation.Convert;
import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Transient;

import java.util.List;

/**
 * 搜索结果
 */
@Entity
public class SearchData {
    @Id
    private String novelid;
    private String novelName;
    private String cover;
    private String summary;
    private String authorid;
    private String authorName;
    @Transient
    private TTFeedAd ad;

    //用户id
    private String uid;
    /**
     * isTop 是否火 1是，0否
     */
    private int isTop;
    //用到了这个Convert注解，表明它们的转换类，这样就可以转换成String保存到数据库中了
    @Convert(columnType = String.class, converter = BookClassDataConvert.class)
    private List<BookClassData> categoryNames;


    @Generated(hash = 1496012724)
    public SearchData(String novelid, String novelName, String cover,
            String summary, String authorid, String authorName, String uid,
            int isTop, List<BookClassData> categoryNames) {
        this.novelid = novelid;
        this.novelName = novelName;
        this.cover = cover;
        this.summary = summary;
        this.authorid = authorid;
        this.authorName = authorName;
        this.uid = uid;
        this.isTop = isTop;
        this.categoryNames = categoryNames;
    }

    @Generated(hash = 693570109)
    public SearchData() {
    }


    public void setNovelid(String novelid) {
        this.novelid = novelid;
    }

    public String getNovelid() {
        return novelid;
    }

    public void setNovelName(String novelName) {
        this.novelName = novelName;
    }

    public String getNovelName() {
        return novelName;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public String getCover() {
        return cover;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public String getSummary() {
        return summary;
    }

    public void setAuthorid(String authorid) {
        this.authorid = authorid;
    }

    public String getAuthorid() {
        return authorid;
    }

    public void setAuthorName(String authorName) {
        this.authorName = authorName;
    }

    public String getAuthorName() {
        return authorName;
    }

    public List<BookClassData> getCategoryNames() {
        return categoryNames;
    }

    public void setCategoryNames(List<BookClassData> categoryNames) {
        this.categoryNames = categoryNames;
    }

    public int getIsTop() {
        return isTop;
    }

    public void setIsTop(int isTop) {
        this.isTop = isTop;
    }

    public String getUid() {
        return this.uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public TTFeedAd getAd() {
        return ad;
    }

    public void setAd(TTFeedAd ad) {
        this.ad = ad;
    }
}
